<div class="wide form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
        'htmlOptions'=>array('class'=>'search')
)); ?>

	<p>
		<?php echo $form->label($model,'id'); ?>
		<?php echo $form->textField($model,'id',array('size' => 5)); ?>
	</p>

	<p>
		<?php echo $form->label($model,'nombre'); ?>
		<?php echo $form->textField($model,'nombre',array('size'=>25,'maxlength'=>25)); ?>
	</p>

	<p>
		<?php echo $form->label($model,'descripcion'); ?>
		<?php echo $form->textField($model,'descripcion',array('size'=>60,'maxlength'=>255)); ?>
	</p>

	<p>
		<?php echo $form->label($model,'parent_id'); ?>
		<?php
        $seleccione = array(null => "Seleccione un campo");
        $categorias =  Chtml::listData(Categoria::model()->findAll(), "id", "nombre");
        echo $form->dropDownList($model, "parent_id", $seleccione + $categorias);
        ?>
	</p>

	<p>
		<?php echo CHtml::submitButton('Buscar', array('class' => 'submit tiny')); ?>
	</p>

<?php $this->endWidget(); ?>

</div><!-- search-form -->